import itertools

with open('input.txt') as file:
    numbers = [int(line) for line in file.readlines()]

    for (i, number) in enumerate(numbers[25:], 25):
        # 'i' is first not pre index
        # take two numbers from numbers[i-25:i]
        for pair in itertools.combinations(numbers[i-25:i], 2):
            if sum(pair) == number:
                break
        # no any two nums' sum == number
        else:
            print(number)
            break